Skip to content

feat(i18n): localize the app into 13 languages - #18

Merged
markm39 merged 1 commit into
mainfrom
feat/i18n-core
Aug 30, 2026
Merged

feat(i18n): localize the app into 13 languages#18
markm39 merged 1 commit into
mainfrom
feat/i18n-core

Conversation

@markm39

@markm39 markm39 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

App-side i18n (PR A of 2 — do not merge B before this)

New src/i18n/ module:

  • English master catalog with Strings = typeof en — every other locale file is typed as Strings, so a missing key or wrong function arity in ANY translation is a compile error, not a runtime surprise.
  • 12 full translations: de, fr, es, it, pt, ja, ko, nl, ru, zh-Hans, zh-Hant (~125 strings each). Parameterized strings are functions, giving correct pluralization per language (Russian three-form plurals; CJK drop the singular branch; Korean particle alternation).
  • Locale resolution via expo-localization, once at startup, behind a lazy require in try/catch — a missing native module (old binary, tests) degrades to English instead of crashing (hit exactly this on the simulator before the rebuild). Chinese resolves by script code first; region only as fallback, so a zh-Hans user with device region TW isn't misrouted (review-caught bug).

Everything outside the editor is localized: library + folder screens, all dialogs and menus, onboarding (incl. the backup slide), backup status/alerts/restore flow, support + community sheets, relative timestamps. Editor strings + the 1.3 (build 10) bump come in PR B, stacked on this branch.

Verification

  • Typecheck enforces catalog completeness across all 12 locales; 43/43 tests; Metro export bundles
  • Simulator E2E with device language set to German (new native build with the ExpoLocalization pod): library renders 'Noch keine Notizen …'
  • Review agent pass applied: 3 missed strings wired (folder-delete errors, Create button, back label), zh resolver fix, native-idiom polish in de/fr/es/it/pt/nl/ru/ja/ko

Note: adds the expo-localization pod — needs a native rebuild after merge (pod install already reflected in Podfile.lock).

https://claude.ai/code/session_01YM3PBapEXHwuXY97Bibsqk

…backup, sheets)

Adds a typed i18n module: src/i18n with an English master catalog
(Strings = typeof en) and 12 full translations - de, fr, es, it, pt,
ja, ko, nl, ru, zh-Hans, zh-Hant - each typed as Strings so the
compiler rejects any missing key or wrong parameter arity.
Parameterized strings are plain functions (correct pluralization per
language, including Russian three-form plurals; CJK languages drop the
singular branch).

Locale resolution uses expo-localization once at startup, with a lazy
require so a missing native module degrades to English instead of
crashing. The Chinese branch resolves by script code first (region is
only a fallback via languageRegionCode) so a Simplified-Chinese user
with a TW/HK/MO device region is not misrouted to Traditional.

All user-facing strings outside the editor now come from the catalog:
library and folder screens, note/folder menus and dialogs, onboarding
(including the backup slide), backup status lines and alerts, support
and community sheets, and relative timestamps. The editor screen is
the follow-up PR.

Verified on iPad simulator with device language set to German (native
rebuild with the ExpoLocalization pod); typecheck and all 43 tests
pass; Metro export bundles.

Claude-Session: https://claude.ai/code/session_01YM3PBapEXHwuXY97Bibsqk
@markm39
markm39 merged commit 2a7ae95 into main Aug 30, 2026
1 check passed
@markm39
markm39 deleted the feat/i18n-core branch August 30, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant